﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace ISFProject.Models
{
    public class Address
    {
        [Key]
        public int AdressId { get; set; }

        [Required(ErrorMessage = "Please your street name")]
        [StringLength(45, MinimumLength = 3, ErrorMessage = "Invalid field length")]
        [Display(Name = "Street name*")]
        public string StreetName { get; set; }

        [Required(ErrorMessage = "Please your house number")]
        [StringLength(45, MinimumLength = 3, ErrorMessage = "Invalid field length")]
        [Display(Name = "Number*")]
        public int Number { get; set; }

        public int CityId { get; set; }
        public virtual City City { get; set; }

        public virtual List<School> School { get; set; }
        public virtual List<NSSF> NSSF { get; set; }
        public virtual List<Meeting> Meeting { get; set; }
       
    }
}